<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<jsp:include page="/includes/jsp/titulo.jsp"></jsp:include>
<form action="carregaCombosPrincipais" method="POST">
  <input type="hidden" name="pagina" value="${param.pagina}">
  <input type="hidden" name="id"  value="${param.id}">
  <input type="hidden" name="codigo" id="codigo" value="${usuario_.usucodigo}">
  <h3>${usuario_.usunome}</h3>

  <table>
  <tr bgcolor="#e0e0e0">
    <th>Departamentos do Usu&aacute;rio</th>
    <th></th>
  </tr>  
  <tr bgcolor="#f0f0f0">
  	<td>
   		<table> 
   		<tr><td align="center" >  
        	<select size="15" name="departamentousuario">
           		<c:forEach var="depusuario" items="${departamentosusuario}" varStatus="s" >
           		    <c:if test="${depusuario.depativo}">
           		    	<option value=${depusuario.depcodigo}> 
                    		${depusuario.depnome}</option>  
                    </c:if>		   
            	</c:forEach>           	
       		</select>
   		</td></tr>
   		<tr><td align="center" > 
       		<input type="submit" name="remover" value="Remover">
   		</td></tr>
   		</table>	
    </td>    
    <td>
    	<table> 
    	<tr><td align="center">  
    		<select size="1" name="departamentoainserir">
           		<c:forEach var="depinserir" items="${departamentosainserir}" varStatus="s" >
           			<c:if test="${depinserir.depativo}">
           				<option value=${depinserir.depcodigo}> 
                   	 		${depinserir.depnome}</option>   
                   	 </c:if>		  
            	</c:forEach>           	
     		</select>
     	</td></tr>
     	<tr><td align="center"> 
     		<input type="submit" name="associar" value="Associar">
     	</td></tr>
     	</table>	
    </td>    
  </tr>
  <tr bgcolor="#e0e0e0">
  	<td colspan="2" align="center">
    	<input type="button" name="voltar" value="Voltar" onclick="location.href='carregaCombosPrincipais?pagina=listaUsuarios'">
    </td>	
  </tr>
  
</table>
</form>
